home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-08-17 | 64.3 KB | 1,743 lines | [TEXT/MPS ] |
- ;
- ; File: Appearance.a
- ;
- ; Contains: Appearance Manager Interfaces.
- ;
- ; Version: Technology: Allegro
- ; Release: Universal Interfaces 3.2
- ;
- ; Copyright: © 1994-1998 by Apple Computer, Inc., all rights reserved
- ;
- ; Bugs?: For bug reports, consult the following page on
- ; the World Wide Web:
- ;
- ; http://developer.apple.com/bugreporter/
- ;
- ;
- IF &TYPE('__APPEARANCE__') = 'UNDEFINED' THEN
- __APPEARANCE__ SET 1
-
- IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
- include 'MacTypes.a'
- ENDIF
- IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
- include 'Quickdraw.a'
- ENDIF
- IF &TYPE('__TEXTEDIT__') = 'UNDEFINED' THEN
- include 'TextEdit.a'
- ENDIF
- IF &TYPE('__QDOFFSCREEN__') = 'UNDEFINED' THEN
- include 'QDOffscreen.a'
- ENDIF
- IF &TYPE('__MACWINDOWS__') = 'UNDEFINED' THEN
- include 'MacWindows.a'
- ENDIF
- IF &TYPE('__CONTROLS__') = 'UNDEFINED' THEN
- include 'Controls.a'
- ENDIF
-
- ; ——————————————————————————————————————————————————————————————————————————————————
- ; Appearance Manager constants, etc.
- ; ——————————————————————————————————————————————————————————————————————————————————
-
- ; Appearance Trap Number
- _AppearanceDispatch EQU $AA74
- ; Gestalt selector and values for the Appearance Manager
-
- gestaltAppearanceAttr EQU 'appr'
- gestaltAppearanceExists EQU 0
- gestaltAppearanceCompatMode EQU 1
- ; Gestalt selector for determining Appearance Manager version
- ; If this selector does not exist, but gestaltAppearanceAttr
- ; does, it indicates that the 1.0 version is installed. This
- ; gestalt returns a BCD number representing the version of the
- ; Appearance Manager that is currently running, e.g. 0x0101 for
- ; version 1.0.1.
-
- gestaltAppearanceVersion EQU 'apvr'
- ; Appearance Manager Apple Events (1.1 and later)
-
- kAppearanceEventClass EQU 'appr' ; Event Class
- kAEAppearanceChanged EQU 'thme' ; Appearance changed (e.g. platinum to hi-tech)
- kAESystemFontChanged EQU 'sysf' ; system font changed
- kAESmallSystemFontChanged EQU 'ssfn' ; small system font changed
- kAEViewsFontChanged EQU 'vfnt' ; views font changed
- ; ——————————————————————————————————————————————————————————————————————————————————
- ; Appearance Manager file types
- ; ——————————————————————————————————————————————————————————————————————————————————
-
- kThemeDataFileType EQU 'thme' ; file type for theme files
- kThemePlatinumFileType EQU 'pltn' ; file type for platinum appearance
- kThemeCustomThemesFileType EQU 'scen' ; file type for user themes
- kThemeSoundTrackFileType EQU 'tsnd'
- ; Appearance Manager Error Codes
-
- themeInvalidBrushErr EQU -30560 ; pattern index invalid
- themeProcessRegisteredErr EQU -30561
- themeProcessNotRegisteredErr EQU -30562
- themeBadTextColorErr EQU -30563
- themeHasNoAccentsErr EQU -30564
- themeBadCursorIndexErr EQU -30565
- themeScriptFontNotFoundErr EQU -30566 ; theme font requested for uninstalled script system
- themeMonitorDepthNotSupportedErr EQU -30567 ; theme not supported at monitor depth
-
- kThemeBrushDialogBackgroundActive EQU 1 ; Dialogs
- kThemeBrushDialogBackgroundInactive EQU 2 ; Dialogs
- kThemeBrushAlertBackgroundActive EQU 3
- kThemeBrushAlertBackgroundInactive EQU 4
- kThemeBrushModelessDialogBackgroundActive EQU 5
- kThemeBrushModelessDialogBackgroundInactive EQU 6
- kThemeBrushUtilityWindowBackgroundActive EQU 7 ; Miscellaneous
- kThemeBrushUtilityWindowBackgroundInactive EQU 8 ; Miscellaneous
- kThemeBrushListViewSortColumnBackground EQU 9 ; Finder
- kThemeBrushListViewBackground EQU 10
- kThemeBrushIconLabelBackground EQU 11
- kThemeBrushListViewSeparator EQU 12
- kThemeBrushChasingArrows EQU 13
- kThemeBrushDragHilite EQU 14
- kThemeBrushDocumentWindowBackground EQU 15
- kThemeBrushFinderWindowBackground EQU 16
- ; Brushes available in Appearance 1.1 or later
-
- kThemeBrushScrollBarDelimiterActive EQU 17
- kThemeBrushScrollBarDelimiterInactive EQU 18
- kThemeBrushFocusHighlight EQU 19
- kThemeBrushPopupArrowActive EQU 20
- kThemeBrushPopupArrowPressed EQU 21
- kThemeBrushPopupArrowInactive EQU 22
- kThemeBrushAppleGuideCoachmark EQU 23
- kThemeBrushIconLabelBackgroundSelected EQU 24
- kThemeBrushStaticAreaFill EQU 25
- kThemeBrushActiveAreaFill EQU 26
- kThemeBrushButtonFrameActive EQU 27
- kThemeBrushButtonFrameInactive EQU 28
- kThemeBrushButtonFaceActive EQU 29
- kThemeBrushButtonFaceInactive EQU 30
- kThemeBrushButtonFacePressed EQU 31
- kThemeBrushButtonActiveDarkShadow EQU 32
- kThemeBrushButtonActiveDarkHighlight EQU 33
- kThemeBrushButtonActiveLightShadow EQU 34
- kThemeBrushButtonActiveLightHighlight EQU 35
- kThemeBrushButtonInactiveDarkShadow EQU 36
- kThemeBrushButtonInactiveDarkHighlight EQU 37
- kThemeBrushButtonInactiveLightShadow EQU 38
- kThemeBrushButtonInactiveLightHighlight EQU 39
- kThemeBrushButtonPressedDarkShadow EQU 40
- kThemeBrushButtonPressedDarkHighlight EQU 41
- kThemeBrushButtonPressedLightShadow EQU 42
- kThemeBrushButtonPressedLightHighlight EQU 43
- kThemeBrushBevelActiveLight EQU 44
- kThemeBrushBevelActiveDark EQU 45
- kThemeBrushBevelInactiveLight EQU 46
- kThemeBrushBevelInactiveDark EQU 47
- ; These values are meta-brushes, specific colors that do not
- ; change from theme to theme. You can use them instead of using
- ; direct RGB values.
-
- kThemeBrushBlack EQU -1
- kThemeBrushWhite EQU -2
- ; typedef SInt16 ThemeBrush
-
-
- kThemeTextColorDialogActive EQU 1
- kThemeTextColorDialogInactive EQU 2
- kThemeTextColorAlertActive EQU 3
- kThemeTextColorAlertInactive EQU 4
- kThemeTextColorModelessDialogActive EQU 5
- kThemeTextColorModelessDialogInactive EQU 6
- kThemeTextColorWindowHeaderActive EQU 7
- kThemeTextColorWindowHeaderInactive EQU 8
- kThemeTextColorPlacardActive EQU 9
- kThemeTextColorPlacardInactive EQU 10
- kThemeTextColorPlacardPressed EQU 11
- kThemeTextColorPushButtonActive EQU 12
- kThemeTextColorPushButtonInactive EQU 13
- kThemeTextColorPushButtonPressed EQU 14
- kThemeTextColorBevelButtonActive EQU 15
- kThemeTextColorBevelButtonInactive EQU 16
- kThemeTextColorBevelButtonPressed EQU 17
- kThemeTextColorPopupButtonActive EQU 18
- kThemeTextColorPopupButtonInactive EQU 19
- kThemeTextColorPopupButtonPressed EQU 20
- kThemeTextColorIconLabel EQU 21
- kThemeTextColorListView EQU 22
- ; Text Colors available in Appearance 1.0.1 or later
-
- kThemeTextColorDocumentWindowTitleActive EQU 23
- kThemeTextColorDocumentWindowTitleInactive EQU 24
- kThemeTextColorMovableModalWindowTitleActive EQU 25
- kThemeTextColorMovableModalWindowTitleInactive EQU 26
- kThemeTextColorUtilityWindowTitleActive EQU 27
- kThemeTextColorUtilityWindowTitleInactive EQU 28
- kThemeTextColorPopupWindowTitleActive EQU 29
- kThemeTextColorPopupWindowTitleInactive EQU 30
- kThemeTextColorRootMenuActive EQU 31
- kThemeTextColorRootMenuSelected EQU 32
- kThemeTextColorRootMenuDisabled EQU 33
- kThemeTextColorMenuItemActive EQU 34
- kThemeTextColorMenuItemSelected EQU 35
- kThemeTextColorMenuItemDisabled EQU 36
- kThemeTextColorPopupLabelActive EQU 37
- kThemeTextColorPopupLabelInactive EQU 38
-
- ; Text colors available in Appearance 1.1 or later
-
- kThemeTextColorTabFrontActive EQU 39
- kThemeTextColorTabNonFrontActive EQU 40
- kThemeTextColorTabNonFrontPressed EQU 41
- kThemeTextColorTabFrontInactive EQU 42
- kThemeTextColorTabNonFrontInactive EQU 43
- kThemeTextColorIconLabelSelected EQU 44
- kThemeTextColorBevelButtonStickyActive EQU 45
- kThemeTextColorBevelButtonStickyInactive EQU 46
- ; These values are specific colors that do not change from
- ; theme to theme. You can use them instead of using direct RGB values.
-
- kThemeTextColorBlack EQU -1
- kThemeTextColorWhite EQU -2
- ; typedef SInt16 ThemeTextColor
-
- ; States to draw primitives: disabled, active, and pressed (hilited)
-
- kThemeStateInactive EQU 0
- kThemeStateActive EQU 1
- kThemeStatePressed EQU 2
- ; obsolete name
-
- kThemeStateDisabled EQU 0
-
- kThemeStatePressedUp EQU 2 ; draw with up pressed (increment/decrement buttons)
- kThemeStatePressedDown EQU 3 ; draw with down pressed (increment/decrement buttons)
- ; typedef UInt32 ThemeDrawState
-
- ; ——————————————————————————————————————————————————————————————————————————————————
- ; Theme cursor selectors available in Appearance 1.1 or later
- ; ——————————————————————————————————————————————————————————————————————————————————
-
- kThemeArrowCursor EQU 0
- kThemeCopyArrowCursor EQU 1
- kThemeAliasArrowCursor EQU 2
- kThemeContextualMenuArrowCursor EQU 3
- kThemeIBeamCursor EQU 4
- kThemeCrossCursor EQU 5
- kThemePlusCursor EQU 6
- kThemeWatchCursor EQU 7 ; Can Animate
- kThemeClosedHandCursor EQU 8
- kThemeOpenHandCursor EQU 9
- kThemePointingHandCursor EQU 10
- kThemeCountingUpHandCursor EQU 11 ; Can Animate
- kThemeCountingDownHandCursor EQU 12 ; Can Animate
- kThemeCountingUpAndDownHandCursor EQU 13 ; Can Animate
- kThemeSpinningCursor EQU 14 ; Can Animate
- kThemeResizeLeftCursor EQU 15
- kThemeResizeRightCursor EQU 16
- kThemeResizeLeftRightCursor EQU 17
- ; typedef UInt32 ThemeCursor
-
- ; ——————————————————————————————————————————————————————————————————————————————————
- ; Theme menu bar drawing states
- ; ——————————————————————————————————————————————————————————————————————————————————
-
- kThemeMenuBarNormal EQU 0
- kThemeMenuBarSelected EQU 1
- ; typedef UInt16 ThemeMenuBarState
-
- ; attributes
-
- kThemeMenuSquareMenuBar EQU $01
- ; ——————————————————————————————————————————————————————————————————————————————————
- ; Theme menu drawing states
- ; ——————————————————————————————————————————————————————————————————————————————————
-
- kThemeMenuActive EQU 0
- kThemeMenuSelected EQU 1
- kThemeMenuInactive EQU 3
- ; obsolete name
-
- kThemeMenuDisabled EQU 3
- ; typedef UInt16 ThemeMenuState
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; MenuType: add kThemeMenuTypeInactive to menu type for DrawThemeMenuBackground if entire
- ; menu is inactive
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- kThemeMenuTypePullDown EQU 0
- kThemeMenuTypePopUp EQU 1
- kThemeMenuTypeHierarchical EQU 2
- kThemeMenuTypeInactive EQU $0100
- ; typedef UInt16 ThemeMenuType
-
-
- kThemeMenuItemPlain EQU 0
- kThemeMenuItemHierarchical EQU 1 ; item has hierarchical arrow
- kThemeMenuItemScrollUpArrow EQU 2 ; for scrollable menus, indicates item is scroller
- kThemeMenuItemScrollDownArrow EQU 3
- kThemeMenuItemAtTop EQU $0100 ; indicates item is being drawn at top of menu
- kThemeMenuItemAtBottom EQU $0200 ; indicates item is being drawn at bottom of menu
- kThemeMenuItemHierBackground EQU $0400 ; item is within a hierarchical menu
- kThemeMenuItemPopUpBackground EQU $0800 ; item is within a popped up menu
- kThemeMenuItemHasIcon EQU $8000 ; add into non-arrow type when icon present.
- ; typedef UInt16 ThemeMenuItemType
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Theme Backgrounds
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- kThemeBackgroundTabPane EQU 1
- kThemeBackgroundPlacard EQU 2
- kThemeBackgroundWindowHeader EQU 3
- kThemeBackgroundListViewWindowHeader EQU 4
- ; typedef UInt32 ThemeBackgroundKind
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Theme Collection tags for Get/SetTheme
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- kThemeNameTag EQU 'name' ; Str255
- kThemeAppearanceFileNameTag EQU 'thme' ; Str255
- kThemeVariantNameTag EQU 'varn' ; Str255
- kThemeSystemFontTag EQU 'lgsf' ; Str255
- kThemeSmallSystemFontTag EQU 'smsf' ; Str255
- kThemeViewsFontTag EQU 'vfnt' ; Str255
- kThemeViewsFontSizeTag EQU 'vfsz' ; SInt16
- kThemeDesktopPatternNameTag EQU 'patn' ; Str255
- kThemeDesktopPatternTag EQU 'patt' ; <variable-length data> (flattened pattern)
- kThemeDesktopPictureNameTag EQU 'dpnm' ; Str255
- kThemeDesktopPictureAliasTag EQU 'dpal' ; <alias handle>
- kThemeDesktopPictureAlignmentTag EQU 'dpan' ; UInt32
- kThemeHighlightColorNameTag EQU 'hcnm' ; Str255
- kThemeHighlightColorTag EQU 'hcol' ; RGBColor
- kThemeExamplePictureIDTag EQU 'epic' ; SInt16
- kThemeSoundsEnabledTag EQU 'snds' ; Boolean
- kThemeSoundTrackNameTag EQU 'sndt' ; Str255
- kThemeSoundMaskTag EQU 'smsk' ; UInt32
- kThemeUserDefinedTag EQU 'user' ; Boolean (this should _always_ be true if present - used by Control Panel).
- kThemeScrollBarArrowStyleTag EQU 'sbar' ; ThemeScrollBarArrowStyle
- kThemeScrollBarThumbStyleTag EQU 'sbth' ; ThemeScrollBarThumbStyle
- kThemeSmoothFontEnabledTag EQU 'smoo' ; Boolean
- kThemeSmoothFontMinSizeTag EQU 'smos' ; UInt16 (must be >= 12 and <= 24)
- kThemeDblClickCollapseTag EQU 'coll' ; Boolean
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Theme Control Settings
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- kThemeCheckBoxClassicX EQU 0 ; check box with an 'X'
- kThemeCheckBoxCheckMark EQU 1 ; check box with a real check mark
- ; typedef UInt16 ThemeCheckBoxStyle
-
-
- kThemeScrollBarArrowsSingle EQU 0 ; single arrow on each end
- kThemeScrollBarArrowsLowerRight EQU 1 ; double arrows only on right or bottom
- ; typedef UInt16 ThemeScrollBarArrowStyle
-
-
- kThemeScrollBarThumbNormal EQU 0 ; normal, classic thumb size
- kThemeScrollBarThumbProportional EQU 1 ; proportional thumbs
- ; typedef UInt16 ThemeScrollBarThumbStyle
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Font constants
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- kThemeSystemFont EQU 0
- kThemeSmallSystemFont EQU 1
- kThemeSmallEmphasizedSystemFont EQU 2
- kThemeViewsFont EQU 3
- ; typedef UInt16 ThemeFontID
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Tab constants
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- kThemeTabNonFront EQU 0
- kThemeTabNonFrontPressed EQU 1
- kThemeTabNonFrontInactive EQU 2
- kThemeTabFront EQU 3
- kThemeTabFrontInactive EQU 4
- ; typedef UInt16 ThemeTabStyle
-
-
- kThemeTabNorth EQU 0
- kThemeTabSouth EQU 1
- kThemeTabEast EQU 2
- kThemeTabWest EQU 3
- ; typedef UInt16 ThemeTabDirection
-
- ; NOTE ON TAB HEIGHT
- ; Use the kThemeSmallTabHeightMax and kThemeLargeTabHeightMax when calculating the rects
- ; to draw tabs into. This height includes the tab frame overlap. Tabs that are not in the
- ; front are only drawn down to where they meet the frame, as if the height was just
- ; kThemeLargeTabHeight, for example, as opposed to the ...Max constant. Remember that for
- ; East and West tabs, the height referred to below is actually the width.
-
- kThemeSmallTabHeight EQU 16 ; amount small tabs protrude from frame.
- kThemeLargeTabHeight EQU 21 ; amount large tabs protrude from frame.
- kThemeTabPaneOverlap EQU 3 ; amount tabs overlap frame.
- kThemeSmallTabHeightMax EQU 19 ; small tab height + overlap
- kThemeLargeTabHeightMax EQU 24 ; large tab height + overlap
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Track kinds
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- kThemeScrollBar EQU 0
- kThemeSmallScrollBar EQU 1
- kThemeSlider EQU 2
- kThemeProgressBar EQU 3
- kThemeIndeterminateBar EQU 4
- ; typedef UInt16 ThemeTrackKind
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Track enable states
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- ; track states
- kThemeTrackActive EQU 0
- kThemeTrackDisabled EQU 1
- kThemeTrackNothingToScroll EQU 2
- ; typedef UInt8 ThemeTrackEnableState
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Track pressed states
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- ; press states (ignored unless track is active)
- kThemeLeftOutsideArrowPressed EQU $01
- kThemeLeftInsideArrowPressed EQU $02
- kThemeLeftTrackPressed EQU $04
- kThemeThumbPressed EQU $08
- kThemeRightTrackPressed EQU $10
- kThemeRightInsideArrowPressed EQU $20
- kThemeRightOutsideArrowPressed EQU $40
- kThemeTopOutsideArrowPressed EQU $01
- kThemeTopInsideArrowPressed EQU $02
- kThemeTopTrackPressed EQU $04
- kThemeBottomTrackPressed EQU $10
- kThemeBottomInsideArrowPressed EQU $20
- kThemeBottomOutsideArrowPressed EQU $40
- ; typedef UInt8 ThemeTrackPressState
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Thumb directions
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- ; thumb direction
- kThemeThumbPlain EQU 0
- kThemeThumbUpward EQU 1
- kThemeThumbDownward EQU 2
- ; typedef UInt8 ThemeThumbDirection
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Track attributes
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- kThemeTrackHorizontal EQU $01 ; track is drawn horizontally
- kThemeTrackRightToLeft EQU $02 ; track progresses from right to left
- kThemeTrackShowThumb EQU $04 ; track's thumb should be drawn
- ; typedef UInt16 ThemeTrackAttributes
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Track info block
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ScrollBarTrackInfo RECORD 0
- viewsize ds.l 1 ; offset: $0 (0) ; current view range size
- pressState ds.b 1 ; offset: $4 (4) ; pressed parts state
- ORG 6
- sizeof EQU * ; size: $6 (6)
- ENDR
- SliderTrackInfo RECORD 0
- thumbDir ds.b 1 ; offset: $0 (0) ; thumb direction
- pressState ds.b 1 ; offset: $1 (1) ; pressed parts state
- sizeof EQU * ; size: $2 (2)
- ENDR
- ProgressTrackInfo RECORD 0
- phase ds.b 1 ; offset: $0 (0) ; phase for indeterminate progress
- ORG 2
- sizeof EQU * ; size: $2 (2)
- ENDR
- ThemeTrackDrawInfo RECORD 0
- kind ds.w 1 ; offset: $0 (0) ; what kind of track this info is for
- bounds ds Rect ; offset: $2 (2) ; track basis rectangle
- min ds.l 1 ; offset: $A (10) ; min track value
- max ds.l 1 ; offset: $E (14) ; max track value
- value ds.l 1 ; offset: $12 (18) ; current thumb value
- reserved ds.l 1 ; offset: $16 (22)
- attributes ds.w 1 ; offset: $1A (26) ; various track attributes
- enableState ds.b 1 ; offset: $1C (28) ; enable state
- filler1 ds.b 1 ; offset: $1D (29)
- scrollbar ds ScrollBarTrackInfo ; offset: $1E (30)
- ORG 30
- slider ds SliderTrackInfo ; offset: $1E (30)
- ORG 30
- progress ds ProgressTrackInfo ; offset: $1E (30)
- ORG 36
- sizeof EQU * ; size: $24 (36)
- ENDR
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; ThemeWindowAttributes
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- kThemeWindowHasGrow EQU $01 ; can the size of the window be changed by the user?
- kThemeWindowHasHorizontalZoom EQU $08 ; window can zoom only horizontally
- kThemeWindowHasVerticalZoom EQU $10 ; window can zoom only vertically
- kThemeWindowHasFullZoom EQU $18 ; window zooms in all directions
- kThemeWindowHasCloseBox EQU $20 ; window has a close box
- kThemeWindowHasCollapseBox EQU $40 ; window has a collapse box
- kThemeWindowHasTitleText EQU $80 ; window has a title/title icon
- kThemeWindowIsCollapsed EQU $0100 ; window is in the collapsed state
- ; typedef UInt32 ThemeWindowAttributes
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Window Types Supported by the Appearance Manager
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- kThemeDocumentWindow EQU 0
- kThemeDialogWindow EQU 1
- kThemeMovableDialogWindow EQU 2
- kThemeAlertWindow EQU 3
- kThemeMovableAlertWindow EQU 4
- kThemePlainDialogWindow EQU 5
- kThemeShadowDialogWindow EQU 6
- kThemePopupWindow EQU 7
- kThemeUtilityWindow EQU 8
- kThemeUtilitySideWindow EQU 9
- ; typedef UInt16 ThemeWindowType
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Window Widgets Supported by the Appearance Manager
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- kThemeWidgetCloseBox EQU 0
- kThemeWidgetZoomBox EQU 1
- kThemeWidgetCollapseBox EQU 2
- ; typedef UInt16 ThemeTitleBarWidget
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Popup arrow orientations
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- kThemeArrowLeft EQU 0
- kThemeArrowDown EQU 1
- kThemeArrowRight EQU 2
- kThemeArrowUp EQU 3
- ; typedef UInt16 ThemeArrowOrientation
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Popup arrow sizes
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- kThemeArrow3pt EQU 0
- kThemeArrow5pt EQU 1
- kThemeArrow7pt EQU 2
- kThemeArrow9pt EQU 3
- ; typedef UInt16 ThemePopupArrowSize
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Grow box directions
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- kThemeGrowLeft EQU $01 ; can grow to the left
- kThemeGrowRight EQU $02 ; can grow to the right
- kThemeGrowUp EQU $04 ; can grow up
- kThemeGrowDown EQU $08 ; can grow down
- ; typedef UInt16 ThemeGrowDirection
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Button kinds
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- kThemePushButton EQU 0
- kThemeCheckBox EQU 1
- kThemeRadioButton EQU 2
- kThemeBevelButton EQU 3 ; bevel button (obsolete)
- kThemeArrowButton EQU 4 ; popup button without text (no label)
- kThemePopupButton EQU 5 ; popup button
- kThemeDisclosureButton EQU 6
- kThemeIncDecButton EQU 7 ; increment/decrement buttons (no label)
- kThemeSmallBevelButton EQU 8 ; small-shadow bevel button
- kThemeMediumBevelButton EQU 3 ; med-shadow bevel button
- kThemeLargeBevelButton EQU 9 ; large-shadow bevel button
- ; typedef UInt16 ThemeButtonKind
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Common button values
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- kThemeButtonOff EQU 0
- kThemeButtonOn EQU 1
- kThemeButtonMixed EQU 2
- kThemeDisclosureRight EQU 0
- kThemeDisclosureDown EQU 1
- kThemeDisclosureLeft EQU 2
- ; typedef UInt16 ThemeButtonValue
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Button adornment types
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- kThemeAdornmentNone EQU 0
- kThemeAdornmentDefault EQU $01 ; if set, draw default ornamentation ( push button only )
- kThemeAdornmentFocus EQU $04 ; if set, draw focus
- kThemeAdornmentRightToLeft EQU $10 ; if set, draw right to left label
- kThemeAdornmentDrawIndicatorOnly EQU $20 ; if set, don't draw or erase label ( radio, check, disclosure )
- ; typedef UInt16 ThemeButtonAdornment
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Button drawing info block
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ThemeButtonDrawInfo RECORD 0
- state ds.l 1 ; offset: $0 (0)
- value ds.w 1 ; offset: $4 (4)
- adornment ds.w 1 ; offset: $6 (6)
- sizeof EQU * ; size: $8 (8)
- ENDR
- ; typedef struct ThemeButtonDrawInfo * ThemeButtonDrawInfoPtr
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Sound Support
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Sound classes
- ;
- ; You can use the constants below to set what sounds are active using the SetTheme API.
- ; Use these with the kThemeSoundMask tag.
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- kThemeNoSounds EQU 0
- kThemeWindowSoundsMask EQU $01
- kThemeMenuSoundsMask EQU $02
- kThemeControlSoundsMask EQU $04
- kThemeFinderSoundsMask EQU $08
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Drag Sounds
- ;
- ; Drag sounds are looped for the duration of the drag.
- ;
- ; Call BeginThemeDragSound at the start of the drag.
- ; Call EndThemeDragSound when the drag has finished.
- ;
- ; Note that in order to maintain a consistent user experience, only one drag sound may
- ; occur at a time. The sound should be attached to a mouse action, start after the
- ; mouse goes down and stop when the mouse is released.
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
- kThemeDragSoundNone EQU 0
- kThemeDragSoundMoveWindow EQU 'wmov'
- kThemeDragSoundGrowWindow EQU 'wgro'
- kThemeDragSoundMoveUtilWindow EQU 'umov'
- kThemeDragSoundGrowUtilWindow EQU 'ugro'
- kThemeDragSoundMoveDialog EQU 'dmov'
- kThemeDragSoundMoveAlert EQU 'amov'
- kThemeDragSoundMoveIcon EQU 'imov'
- kThemeDragSoundSliderThumb EQU 'slth'
- kThemeDragSoundSliderGhost EQU 'slgh'
- kThemeDragSoundScrollBarThumb EQU 'sbth'
- kThemeDragSoundScrollBarGhost EQU 'sbgh'
- kThemeDragSoundScrollBarArrowDecreasing EQU 'sbad'
- kThemeDragSoundScrollBarArrowIncreasing EQU 'sbai'
- kThemeDragSoundDragging EQU 'drag'
- ; typedef OSType ThemeDragSoundKind
-
- ; ——————————————————————————————————————————————————————————————————————————
- ; State-change sounds
- ;
- ; State-change sounds are played asynchonously as a one-shot.
- ;
- ; Call PlayThemeSound to play the sound. The sound will play
- ; asynchronously until complete, then stop automatically.
- ; ——————————————————————————————————————————————————————————————————————————
-
- kThemeSoundNone EQU 0
- kThemeSoundMenuOpen EQU 'mnuo' ; menu sounds
- kThemeSoundMenuClose EQU 'mnuc'
- kThemeSoundMenuItemHilite EQU 'mnui'
- kThemeSoundMenuItemRelease EQU 'mnus'
- kThemeSoundWindowClosePress EQU 'wclp' ; window sounds
- kThemeSoundWindowCloseEnter EQU 'wcle'
- kThemeSoundWindowCloseExit EQU 'wclx'
- kThemeSoundWindowCloseRelease EQU 'wclr'
- kThemeSoundWindowZoomPress EQU 'wzmp'
- kThemeSoundWindowZoomEnter EQU 'wzme'
- kThemeSoundWindowZoomExit EQU 'wzmx'
- kThemeSoundWindowZoomRelease EQU 'wzmr'
- kThemeSoundWindowCollapsePress EQU 'wcop'
- kThemeSoundWindowCollapseEnter EQU 'wcoe'
- kThemeSoundWindowCollapseExit EQU 'wcox'
- kThemeSoundWindowCollapseRelease EQU 'wcor'
- kThemeSoundWindowDragBoundary EQU 'wdbd'
- kThemeSoundUtilWinClosePress EQU 'uclp' ; utility window sounds
- kThemeSoundUtilWinCloseEnter EQU 'ucle'
- kThemeSoundUtilWinCloseExit EQU 'uclx'
- kThemeSoundUtilWinCloseRelease EQU 'uclr'
- kThemeSoundUtilWinZoomPress EQU 'uzmp'
- kThemeSoundUtilWinZoomEnter EQU 'uzme'
- kThemeSoundUtilWinZoomExit EQU 'uzmx'
- kThemeSoundUtilWinZoomRelease EQU 'uzmr'
- kThemeSoundUtilWinCollapsePress EQU 'ucop'
- kThemeSoundUtilWinCollapseEnter EQU 'ucoe'
- kThemeSoundUtilWinCollapseExit EQU 'ucox'
- kThemeSoundUtilWinCollapseRelease EQU 'ucor'
- kThemeSoundUtilWinDragBoundary EQU 'udbd'
- kThemeSoundWindowOpen EQU 'wopn' ; window close and zoom action
- kThemeSoundWindowClose EQU 'wcls'
- kThemeSoundWindowZoomIn EQU 'wzmi'
- kThemeSoundWindowZoomOut EQU 'wzmo'
- kThemeSoundWindowCollapseUp EQU 'wcol'
- kThemeSoundWindowCollapseDown EQU 'wexp'
- kThemeSoundWindowActivate EQU 'wact'
- kThemeSoundUtilWindowOpen EQU 'uopn'
- kThemeSoundUtilWindowClose EQU 'ucls'
- kThemeSoundUtilWindowZoomIn EQU 'uzmi'
- kThemeSoundUtilWindowZoomOut EQU 'uzmo'
- kThemeSoundUtilWindowCollapseUp EQU 'ucol'
- kThemeSoundUtilWindowCollapseDown EQU 'uexp'
- kThemeSoundUtilWindowActivate EQU 'uact'
- kThemeSoundDialogOpen EQU 'dopn'
- kThemeSoundDialogClose EQU 'dlgc'
- kThemeSoundAlertOpen EQU 'aopn'
- kThemeSoundAlertClose EQU 'altc'
- kThemeSoundPopupWindowOpen EQU 'pwop'
- kThemeSoundPopupWindowClose EQU 'pwcl'
- kThemeSoundButtonPress EQU 'btnp' ; button
- kThemeSoundButtonEnter EQU 'btne'
- kThemeSoundButtonExit EQU 'btnx'
- kThemeSoundButtonRelease EQU 'btnr'
- kThemeSoundDefaultButtonPress EQU 'dbtp' ; default button
- kThemeSoundDefaultButtonEnter EQU 'dbte'
- kThemeSoundDefaultButtonExit EQU 'dbtx'
- kThemeSoundDefaultButtonRelease EQU 'dbtr'
- kThemeSoundCancelButtonPress EQU 'cbtp' ; cancel button
- kThemeSoundCancelButtonEnter EQU 'cbte'
- kThemeSoundCancelButtonExit EQU 'cbtx'
- kThemeSoundCancelButtonRelease EQU 'cbtr'
- kThemeSoundCheckboxPress EQU 'chkp' ; checkboxes
- kThemeSoundCheckboxEnter EQU 'chke'
- kThemeSoundCheckboxExit EQU 'chkx'
- kThemeSoundCheckboxRelease EQU 'chkr'
- kThemeSoundRadioPress EQU 'radp' ; radio buttons
- kThemeSoundRadioEnter EQU 'rade'
- kThemeSoundRadioExit EQU 'radx'
- kThemeSoundRadioRelease EQU 'radr'
- kThemeSoundScrollArrowPress EQU 'sbap' ; scroll bars
- kThemeSoundScrollArrowEnter EQU 'sbae'
- kThemeSoundScrollArrowExit EQU 'sbax'
- kThemeSoundScrollArrowRelease EQU 'sbar'
- kThemeSoundScrollEndOfTrack EQU 'sbte'
- kThemeSoundScrollTrackPress EQU 'sbtp'
- kThemeSoundSliderEndOfTrack EQU 'slte' ; sliders
- kThemeSoundSliderTrackPress EQU 'sltp'
- kThemeSoundBalloonOpen EQU 'blno' ; help balloons
- kThemeSoundBalloonClose EQU 'blnc'
- kThemeSoundBevelPress EQU 'bevp' ; Bevel buttons
- kThemeSoundBevelEnter EQU 'beve'
- kThemeSoundBevelExit EQU 'bevx'
- kThemeSoundBevelRelease EQU 'bevr'
- kThemeSoundLittleArrowUpPress EQU 'laup' ; Little Arrows
- kThemeSoundLittleArrowDnPress EQU 'ladp'
- kThemeSoundLittleArrowEnter EQU 'lare'
- kThemeSoundLittleArrowExit EQU 'larx'
- kThemeSoundLittleArrowUpRelease EQU 'laur'
- kThemeSoundLittleArrowDnRelease EQU 'ladr'
- kThemeSoundPopupPress EQU 'popp' ; Popup Buttons
- kThemeSoundPopupEnter EQU 'pope'
- kThemeSoundPopupExit EQU 'popx'
- kThemeSoundPopupRelease EQU 'popr'
- kThemeSoundDisclosurePress EQU 'dscp' ; Disclosure Buttons
- kThemeSoundDisclosureEnter EQU 'dsce'
- kThemeSoundDisclosureExit EQU 'dscx'
- kThemeSoundDisclosureRelease EQU 'dscr'
- kThemeSoundTabPressed EQU 'tabp' ; Tabs
- kThemeSoundTabEnter EQU 'tabe'
- kThemeSoundTabExit EQU 'tabx'
- kThemeSoundTabRelease EQU 'tabr'
- kThemeSoundDragTargetHilite EQU 'dthi' ; drag manager
- kThemeSoundDragTargetUnhilite EQU 'dtuh'
- kThemeSoundDragTargetDrop EQU 'dtdr'
- kThemeSoundEmptyTrash EQU 'ftrs' ; finder
- kThemeSoundSelectItem EQU 'fsel'
- kThemeSoundNewItem EQU 'fnew'
- kThemeSoundReceiveDrop EQU 'fdrp'
- kThemeSoundCopyDone EQU 'fcpd'
- kThemeSoundResolveAlias EQU 'fral'
- kThemeSoundLaunchApp EQU 'flap'
- kThemeSoundDiskInsert EQU 'dski'
- kThemeSoundDiskEject EQU 'dske'
- kThemeSoundFinderDragOnIcon EQU 'fdon'
- kThemeSoundFinderDragOffIcon EQU 'fdof'
- ; typedef OSType ThemeSoundKind
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Window Metrics
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Window metrics are used by the Appearance manager to fill in the blanks necessary to
- ; draw windows. If a value is not appropriate for the type of window, be sure to fill in
- ; the slot in the structure with zero. For the popupTabOffset parameter, you can pass a
- ; real value based on the left edge of the window. This value might be interpreted in a
- ; different manner when depending on the value of the popupTabPosition field. The values
- ; you can pass into popupTabPosition are:
- ;
- ; kThemePopupTabNormalPosition
- ; Starts the tab left edge at the position indicated by the popupTabOffset field.
- ;
- ; kThemePopupTabCenterOnWindow
- ; tells us to ignore the offset field and instead simply center the width of the
- ; handle on the window.
- ;
- ; kThemePopupTabCenterOnOffset
- ; tells us to center the width of the handle around the value passed in offset.
- ;
- ; The Appearance Manager will try its best to accomodate the requested placement, but may
- ; move the handle slightly to make it fit correctly.
- ;
-
- kThemePopupTabNormalPosition EQU 0
- kThemePopupTabCenterOnWindow EQU 1
- kThemePopupTabCenterOnOffset EQU 2
- ThemeWindowMetrics RECORD 0
- metricSize ds.w 1 ; offset: $0 (0) ; should be always be sizeof( ThemeWindowMetrics )
- titleHeight ds.w 1 ; offset: $2 (2)
- titleWidth ds.w 1 ; offset: $4 (4)
- popupTabOffset ds.w 1 ; offset: $6 (6)
- popupTabWidth ds.w 1 ; offset: $8 (8)
- popupTabPosition ds.w 1 ; offset: $A (10)
- sizeof EQU * ; size: $C (12)
- ENDR
- ; typedef struct ThemeWindowMetrics * ThemeWindowMetricsPtr
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Drawing State
- ; ——————————————————————————————————————————————————————————————————————————————————————————
-
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; Callback procs
- ; ——————————————————————————————————————————————————————————————————————————————————————————
- ; ——————————————————————————————————————————————————————————————————————————————————
- ; Menu Drawing callbacks
- ; ——————————————————————————————————————————————————————————————————————————————————
- ; ——————————————————————————————————————————————————————————————————————————————————
- ; Appearance Manager APIs
- ; ——————————————————————————————————————————————————————————————————————————————————
- ; Registering Appearance-Savvy Applications
- ;
- ; pascal OSStatus RegisterAppearanceClient(void)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _RegisterAppearanceClient
- move.w #$0015,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION RegisterAppearanceClient
- ENDIF
-
- ;
- ; pascal OSStatus UnregisterAppearanceClient(void)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _UnregisterAppearanceClient
- move.w #$0016,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION UnregisterAppearanceClient
- ENDIF
-
- ;
- ; pascal Boolean IsAppearanceClient(const ProcessSerialNumber *process)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _IsAppearanceClient
- move.w #$FFFF,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION IsAppearanceClient
- ENDIF
-
- ; *****************************************************************************
- ; NOTES ON THEME BRUSHES
- ; Theme brushes can be either colors or patterns, depending on the theme.
- ; Because of this, you should be prepared to handle the case where a brush
- ; is a pattern and save and restore the pnPixPat and bkPixPat fields of
- ; your GrafPorts when saving the fore and back colors. Also, since patterns
- ; in bkPixPat override the background color of the window, you should use
- ; BackPat to set your background pattern to a normal white pattern. This
- ; will ensure that you can use RGBBackColor to set your back color to white,
- ; call EraseRect and get the expected results.
- ;****************************************************************************
-
-
- ;
- ; pascal OSStatus SetThemePen(ThemeBrush inBrush, SInt16 inDepth, Boolean inIsColorDevice)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _SetThemePen
- move.w #$0001,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetThemePen
- ENDIF
-
- ;
- ; pascal OSStatus SetThemeBackground(ThemeBrush inBrush, SInt16 inDepth, Boolean inIsColorDevice)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _SetThemeBackground
- move.w #$0002,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetThemeBackground
- ENDIF
-
- ;
- ; pascal OSStatus SetThemeTextColor(ThemeTextColor inColor, SInt16 inDepth, Boolean inIsColorDevice)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _SetThemeTextColor
- move.w #$0003,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetThemeTextColor
- ENDIF
-
- ;
- ; pascal OSStatus SetThemeWindowBackground(WindowPtr inWindow, ThemeBrush inBrush, Boolean inUpdate)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _SetThemeWindowBackground
- move.w #$0004,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetThemeWindowBackground
- ENDIF
-
- ; Window Placards, Headers and Frames
- ;
- ; pascal OSStatus DrawThemeWindowHeader(const Rect *inRect, ThemeDrawState inState)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DrawThemeWindowHeader
- move.w #$0005,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeWindowHeader
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemeWindowListViewHeader(const Rect *inRect, ThemeDrawState inState)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DrawThemeWindowListViewHeader
- move.w #$0006,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeWindowListViewHeader
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemePlacard(const Rect *inRect, ThemeDrawState inState)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DrawThemePlacard
- move.w #$0007,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemePlacard
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemeEditTextFrame(const Rect *inRect, ThemeDrawState inState)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DrawThemeEditTextFrame
- move.w #$0009,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeEditTextFrame
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemeListBoxFrame(const Rect *inRect, ThemeDrawState inState)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DrawThemeListBoxFrame
- move.w #$000A,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeListBoxFrame
- ENDIF
-
- ; Keyboard Focus Drawing
- ;
- ; pascal OSStatus DrawThemeFocusRect(const Rect *inRect, Boolean inHasFocus)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DrawThemeFocusRect
- move.w #$000B,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeFocusRect
- ENDIF
-
- ; Dialog Group Boxes and Separators
- ;
- ; pascal OSStatus DrawThemePrimaryGroup(const Rect *inRect, ThemeDrawState inState)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DrawThemePrimaryGroup
- move.w #$000C,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemePrimaryGroup
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemeSecondaryGroup(const Rect *inRect, ThemeDrawState inState)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DrawThemeSecondaryGroup
- move.w #$000D,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeSecondaryGroup
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemeSeparator(const Rect *inRect, ThemeDrawState inState)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DrawThemeSeparator
- move.w #$000E,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeSeparator
- ENDIF
-
- ; —————————————————————————————— BEGIN APPEARANCE 1.0.1 ————————————————————————————————————————————
- ; The following Appearance Manager APIs are only available
- ; in Appearance 1.0.1 or later
- ;
- ; pascal OSStatus DrawThemeModelessDialogFrame(const Rect *inRect, ThemeDrawState inState)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DrawThemeModelessDialogFrame
- move.w #$0008,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeModelessDialogFrame
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemeGenericWell(const Rect *inRect, ThemeDrawState inState, Boolean inFillCenter)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DrawThemeGenericWell
- move.w #$0022,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeGenericWell
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemeFocusRegion(RgnHandle inRegion, Boolean inHasFocus)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DrawThemeFocusRegion
- move.w #$0023,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeFocusRegion
- ENDIF
-
- ;
- ; pascal Boolean IsThemeInColor(SInt16 inDepth, Boolean inIsColorDevice)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _IsThemeInColor
- move.w #$0024,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION IsThemeInColor
- ENDIF
-
- ; IMPORTANT: GetThemeAccentColors will only work in the platinum theme. Any other theme will
- ; most likely return an error
- ;
- ; pascal OSStatus GetThemeAccentColors(CTabHandle *outColors)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _GetThemeAccentColors
- move.w #$0025,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeAccentColors
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemeMenuBarBackground(const Rect *inBounds, ThemeMenuBarState inState, UInt32 inAttributes)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DrawThemeMenuBarBackground
- move.w #$0018,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeMenuBarBackground
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemeMenuTitle(const Rect *inMenuBarRect, const Rect *inTitleRect, ThemeMenuState inState, UInt32 inAttributes, MenuTitleDrawingUPP inTitleProc, UInt32 inTitleData)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DrawThemeMenuTitle
- move.w #$0019,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeMenuTitle
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeMenuBarHeight(SInt16 *outHeight)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _GetThemeMenuBarHeight
- move.w #$001A,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeMenuBarHeight
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemeMenuBackground(const Rect *inMenuRect, ThemeMenuType inMenuType)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DrawThemeMenuBackground
- move.w #$001B,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeMenuBackground
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeMenuBackgroundRegion(const Rect *inMenuRect, ThemeMenuType menuType, RgnHandle region)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _GetThemeMenuBackgroundRegion
- move.w #$001C,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeMenuBackgroundRegion
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemeMenuItem(const Rect *inMenuRect, const Rect *inItemRect, SInt16 inVirtualMenuTop, SInt16 inVirtualMenuBottom, ThemeMenuState inState, ThemeMenuItemType inItemType, MenuItemDrawingUPP inDrawProc, UInt32 inUserData)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DrawThemeMenuItem
- move.w #$001D,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeMenuItem
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemeMenuSeparator(const Rect *inItemRect)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DrawThemeMenuSeparator
- move.w #$001E,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeMenuSeparator
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeMenuSeparatorHeight(SInt16 *outHeight)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _GetThemeMenuSeparatorHeight
- move.w #$001F,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeMenuSeparatorHeight
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeMenuItemExtra(ThemeMenuItemType inItemType, SInt16 *outHeight, SInt16 *outWidth)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _GetThemeMenuItemExtra
- move.w #$0020,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeMenuItemExtra
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeMenuTitleExtra(SInt16 *outWidth, Boolean inIsSquished)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _GetThemeMenuTitleExtra
- move.w #$0021,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeMenuTitleExtra
- ENDIF
-
- ; ——————————————————————————————— BEGIN APPEARANCE 1.1 —————————————————————————————————————————————
- ; —————————————————————————————————— THEME SWITCHING ———————————————————————————————————————————————
- ;
- ; pascal OSStatus GetTheme(Collection ioCollection)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetTheme
- ENDIF
-
- ;
- ; pascal OSStatus SetTheme(Collection ioCollection)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetTheme
- ENDIF
-
- ;
- ; pascal OSStatus IterateThemes(ThemeIteratorUPP inProc, void *inUserData)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION IterateThemes
- ENDIF
-
- ; ———————————————————————————————————————— TABS ————————————————————————————————————————————————————
- ;
- ; pascal OSStatus DrawThemeTabPane(const Rect *inRect, ThemeDrawState inState)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeTabPane
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemeTab(const Rect *inRect, ThemeTabStyle inStyle, ThemeTabDirection inDirection, ThemeTabTitleDrawUPP labelProc, UInt32 userData)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeTab
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeTabRegion(const Rect *inRect, ThemeTabStyle inStyle, ThemeTabDirection inDirection, RgnHandle ioRgn)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeTabRegion
- ENDIF
-
- ; ——————————————————————————————————————— CURSORS ——————————————————————————————————————————————————
- ;
- ; pascal OSStatus SetThemeCursor(ThemeCursor inCursor)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetThemeCursor
- ENDIF
-
- ;
- ; pascal OSStatus SetAnimatedThemeCursor(ThemeCursor inCursor, UInt32 inAnimationStep)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetAnimatedThemeCursor
- ENDIF
-
- ; ———————————————————————————————— CONTROL STYLE SETTINGS ——————————————————————————————————————————
- ;
- ; pascal OSStatus GetThemeScrollBarThumbStyle(ThemeScrollBarThumbStyle *outStyle)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeScrollBarThumbStyle
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeScrollBarArrowStyle(ThemeScrollBarArrowStyle *outStyle)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeScrollBarArrowStyle
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeCheckBoxStyle(ThemeCheckBoxStyle *outStyle)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeCheckBoxStyle
- ENDIF
-
- ; ———————————————————————————————————————— FONTS ———————————————————————————————————————————————————
- ;
- ; pascal OSStatus UseThemeFont(ThemeFontID inFontID, ScriptCode inScript)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION UseThemeFont
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeFont(ThemeFontID inFontID, ScriptCode inScript, StringPtr outFontName, SInt16 *outFontSize, Style *outStyle)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeFont
- ENDIF
-
- ; ———————————————————————————————————————— TRACKS ——————————————————————————————————————————————————
- ;
- ; pascal OSStatus DrawThemeTrack(const ThemeTrackDrawInfo *drawInfo, RgnHandle rgnGhost, ThemeEraseUPP eraseProc, UInt32 eraseData)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeTrack
- ENDIF
-
- ;
- ; pascal Boolean HitTestThemeTrack(const ThemeTrackDrawInfo *drawInfo, Point mousePoint, ControlPartCode *partHit)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION HitTestThemeTrack
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeTrackBounds(const ThemeTrackDrawInfo *drawInfo, Rect *bounds)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeTrackBounds
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeTrackThumbRgn(const ThemeTrackDrawInfo *drawInfo, RgnHandle thumbRgn)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeTrackThumbRgn
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeTrackDragRect(const ThemeTrackDrawInfo *drawInfo, Rect *dragRect)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeTrackDragRect
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemeTrackTickMarks(const ThemeTrackDrawInfo *drawInfo, ItemCount numTicks, ThemeEraseUPP eraseProc, UInt32 eraseData)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeTrackTickMarks
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeTrackThumbPositionFromOffset(const ThemeTrackDrawInfo *drawInfo, Point thumbOffset, SInt32 *relativePosition)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeTrackThumbPositionFromOffset
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeTrackThumbPositionFromRegion(const ThemeTrackDrawInfo *drawInfo, RgnHandle thumbRgn, SInt32 *relativePosition)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeTrackThumbPositionFromRegion
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeTrackLiveValue(const ThemeTrackDrawInfo *drawInfo, SInt32 relativePosition, SInt32 *value)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeTrackLiveValue
- ENDIF
-
- ; ——————————————————————————————————— SCROLLBAR ARROWS —————————————————————————————————————————————
- ;
- ; pascal OSStatus DrawThemeScrollBarArrows(const Rect *bounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz, Rect *trackBounds)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeScrollBarArrows
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeScrollBarTrackRect(const Rect *bounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz, Rect *trackBounds)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeScrollBarTrackRect
- ENDIF
-
- ;
- ; pascal Boolean HitTestThemeScrollBarArrows(const Rect *scrollBarBounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz, Point ptHit, Rect *trackBounds, ControlPartCode *partcode)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION HitTestThemeScrollBarArrows
- ENDIF
-
- ; ———————————————————————————————————————— WINDOWS —————————————————————————————————————————————————
- ;
- ; pascal OSStatus GetThemeWindowRegion(ThemeWindowType flavor, const Rect *contRect, ThemeDrawState state, const ThemeWindowMetrics *metrics, ThemeWindowAttributes attributes, WindowRegionCode winRegion, RgnHandle rgn)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeWindowRegion
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemeWindowFrame(ThemeWindowType flavor, const Rect *contRect, ThemeDrawState state, const ThemeWindowMetrics *metrics, ThemeWindowAttributes attributes, WindowTitleDrawingUPP titleProc, UInt32 titleData)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeWindowFrame
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemeTitleBarWidget(ThemeWindowType flavor, const Rect *contRect, ThemeDrawState state, const ThemeWindowMetrics *metrics, ThemeWindowAttributes attributes, ThemeTitleBarWidget widget)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeTitleBarWidget
- ENDIF
-
- ;
- ; pascal Boolean GetThemeWindowRegionHit(ThemeWindowType flavor, const Rect *inContRect, ThemeDrawState state, const ThemeWindowMetrics *metrics, ThemeWindowAttributes inAttributes, Point inPoint, WindowRegionCode *outRegionHit)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeWindowRegionHit
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemeScrollBarDelimiters(ThemeWindowType flavor, const Rect *inContRect, ThemeDrawState state, ThemeWindowAttributes attributes)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeScrollBarDelimiters
- ENDIF
-
- ; ———————————————————————————————————————— BUTTONS —————————————————————————————————————————————————
- ;
- ; pascal OSStatus DrawThemeButton(const Rect *inBounds, ThemeButtonKind inKind, const ThemeButtonDrawInfo *inNewInfo, const ThemeButtonDrawInfo *inPrevInfo, ThemeEraseUPP inEraseProc, ThemeButtonDrawUPP inLabelProc, UInt32 inUserData)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeButton
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeButtonRegion(const Rect *inBounds, ThemeButtonKind inKind, const ThemeButtonDrawInfo *inNewInfo, RgnHandle outRegion)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeButtonRegion
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeButtonContentBounds(const Rect *inBounds, ThemeButtonKind inKind, const ThemeButtonDrawInfo *inDrawInfo, Rect *outBounds)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeButtonContentBounds
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeButtonBackgroundBounds(const Rect *inBounds, ThemeButtonKind inKind, const ThemeButtonDrawInfo *inDrawInfo, Rect *outBounds)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeButtonBackgroundBounds
- ENDIF
-
-
- ; ————————————————————————————————————— INTERFACE SOUNDS ———————————————————————————————————————————
- ;
- ; pascal OSStatus PlayThemeSound(ThemeSoundKind kind)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _PlayThemeSound
- move.w #$0026,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION PlayThemeSound
- ENDIF
-
- ;
- ; pascal OSStatus BeginThemeDragSound(ThemeDragSoundKind kind)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _BeginThemeDragSound
- move.w #$0027,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION BeginThemeDragSound
- ENDIF
-
- ;
- ; pascal OSStatus EndThemeDragSound(void)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _EndThemeDragSound
- move.w #$0028,D0
- dc.w $AA74
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION EndThemeDragSound
- ENDIF
-
- ; —————————————————————————————————————— PRIMITIVES ————————————————————————————————————————————————
- ;
- ; pascal OSStatus DrawThemeTickMark(const Rect *bounds, ThemeDrawState state)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeTickMark
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemeChasingArrows(const Rect *bounds, UInt32 index, ThemeDrawState state, ThemeEraseUPP eraseProc, UInt32 eraseData)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeChasingArrows
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemePopupArrow(const Rect *bounds, ThemeArrowOrientation orientation, ThemePopupArrowSize size, ThemeDrawState state, ThemeEraseUPP eraseProc, UInt32 eraseData)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemePopupArrow
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemeStandaloneGrowBox(Point origin, ThemeGrowDirection growDirection, Boolean isSmall, ThemeDrawState state)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeStandaloneGrowBox
- ENDIF
-
- ;
- ; pascal OSStatus DrawThemeStandaloneNoGrowBox(Point origin, ThemeGrowDirection growDirection, Boolean isSmall, ThemeDrawState state)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DrawThemeStandaloneNoGrowBox
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeStandaloneGrowBoxBounds(Point origin, ThemeGrowDirection growDirection, Boolean isSmall, Rect *bounds)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeStandaloneGrowBoxBounds
- ENDIF
-
- ; ————————————————————————————————————— DRAWING STATE ——————————————————————————————————————————————
- ; The following routines help you save and restore the drawing state in a theme-savvy manner. With
- ; these weapons in your arsenal, there is no grafport you cannot tame. Use ThemeGetDrawingState to
- ; get the current drawing settings for the current port. It will return an opaque object for you
- ; to pass into ThemeSetDrawingState later on. When you are finished with the state, call the
- ; ThemeDisposeDrawingState routine. You can alternatively pass true into the inDisposeNow
- ; parameter of the ThemeSetDrawingState routine. You can use this routine to copy the drawing
- ; state from one port to another as well.
- ;
- ; pascal OSStatus NormalizeThemeDrawingState(void)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NormalizeThemeDrawingState
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeDrawingState(ThemeDrawingState *outState)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeDrawingState
- ENDIF
-
- ;
- ; pascal OSStatus SetThemeDrawingState(ThemeDrawingState inState, Boolean inDisposeNow)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetThemeDrawingState
- ENDIF
-
- ;
- ; pascal OSStatus DisposeThemeDrawingState(ThemeDrawingState inState)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DisposeThemeDrawingState
- ENDIF
-
- ; ————————————————————————————————————— MISCELLANEOUS ——————————————————————————————————————————————
- ; ApplyThemeBackground is used to set up the background for embedded controls
- ; It is normally called by controls that are embedders. The standard controls
- ; call this API to ensure a correct background for the current theme. You pass
- ; in the same rectangle you would if you were calling the drawing primitive.
- ;
- ; pascal OSStatus ApplyThemeBackground(ThemeBackgroundKind inKind, const Rect *bounds, ThemeDrawState inState, SInt16 inDepth, Boolean inColorDev)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION ApplyThemeBackground
- ENDIF
-
- ;
- ; pascal OSStatus SetThemeTextColorForWindow(WindowPtr window, Boolean isActive, SInt16 depth, Boolean isColorDev)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetThemeTextColorForWindow
- ENDIF
-
- ;
- ; pascal Boolean IsValidAppearanceFileType(OSType fileType)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION IsValidAppearanceFileType
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeBrushAsColor(ThemeBrush inBrush, SInt16 inDepth, Boolean inColorDev, RGBColor *outColor)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeBrushAsColor
- ENDIF
-
- ;
- ; pascal OSStatus GetThemeTextColor(ThemeTextColor inColor, SInt16 inDepth, Boolean inColorDev, RGBColor *outColor)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetThemeTextColor
- ENDIF
-
- ; ——————————————————————————————————————————————————————————————————————————————————————————————————
- ; Obsolete symbolic names
- ; ——————————————————————————————————————————————————————————————————————————————————————————————————
- ; Obsolete error codes - use the new ones, s'il vous plait / kudasai
-
- appearanceBadBrushIndexErr EQU -30560 ; pattern index invalid
- appearanceProcessRegisteredErr EQU -30561
- appearanceProcessNotRegisteredErr EQU -30562
- appearanceBadTextColorIndexErr EQU -30563
- appearanceThemeHasNoAccents EQU -30564
- appearanceBadCursorIndexErr EQU -30565
-
- kThemeActiveDialogBackgroundBrush EQU 1
- kThemeInactiveDialogBackgroundBrush EQU 2
- kThemeActiveAlertBackgroundBrush EQU 3
- kThemeInactiveAlertBackgroundBrush EQU 4
- kThemeActiveModelessDialogBackgroundBrush EQU 5
- kThemeInactiveModelessDialogBackgroundBrush EQU 6
- kThemeActiveUtilityWindowBackgroundBrush EQU 7
- kThemeInactiveUtilityWindowBackgroundBrush EQU 8
- kThemeListViewSortColumnBackgroundBrush EQU 9
- kThemeListViewBackgroundBrush EQU 10
- kThemeIconLabelBackgroundBrush EQU 11
- kThemeListViewSeparatorBrush EQU 12
- kThemeChasingArrowsBrush EQU 13
- kThemeDragHiliteBrush EQU 14
- kThemeDocumentWindowBackgroundBrush EQU 15
- kThemeFinderWindowBackgroundBrush EQU 16
-
- kThemeActiveScrollBarDelimiterBrush EQU 17
- kThemeInactiveScrollBarDelimiterBrush EQU 18
- kThemeFocusHighlightBrush EQU 19
- kThemeActivePopupArrowBrush EQU 20
- kThemePressedPopupArrowBrush EQU 21
- kThemeInactivePopupArrowBrush EQU 22
- kThemeAppleGuideCoachmarkBrush EQU 23
-
- kThemeActiveDialogTextColor EQU 1
- kThemeInactiveDialogTextColor EQU 2
- kThemeActiveAlertTextColor EQU 3
- kThemeInactiveAlertTextColor EQU 4
- kThemeActiveModelessDialogTextColor EQU 5
- kThemeInactiveModelessDialogTextColor EQU 6
- kThemeActiveWindowHeaderTextColor EQU 7
- kThemeInactiveWindowHeaderTextColor EQU 8
- kThemeActivePlacardTextColor EQU 9
- kThemeInactivePlacardTextColor EQU 10
- kThemePressedPlacardTextColor EQU 11
- kThemeActivePushButtonTextColor EQU 12
- kThemeInactivePushButtonTextColor EQU 13
- kThemePressedPushButtonTextColor EQU 14
- kThemeActiveBevelButtonTextColor EQU 15
- kThemeInactiveBevelButtonTextColor EQU 16
- kThemePressedBevelButtonTextColor EQU 17
- kThemeActivePopupButtonTextColor EQU 18
- kThemeInactivePopupButtonTextColor EQU 19
- kThemePressedPopupButtonTextColor EQU 20
- kThemeIconLabelTextColor EQU 21
- kThemeListViewTextColor EQU 22
-
- kThemeActiveDocumentWindowTitleTextColor EQU 23
- kThemeInactiveDocumentWindowTitleTextColor EQU 24
- kThemeActiveMovableModalWindowTitleTextColor EQU 25
- kThemeInactiveMovableModalWindowTitleTextColor EQU 26
- kThemeActiveUtilityWindowTitleTextColor EQU 27
- kThemeInactiveUtilityWindowTitleTextColor EQU 28
- kThemeActivePopupWindowTitleColor EQU 29
- kThemeInactivePopupWindowTitleColor EQU 30
- kThemeActiveRootMenuTextColor EQU 31
- kThemeSelectedRootMenuTextColor EQU 32
- kThemeDisabledRootMenuTextColor EQU 33
- kThemeActiveMenuItemTextColor EQU 34
- kThemeSelectedMenuItemTextColor EQU 35
- kThemeDisabledMenuItemTextColor EQU 36
- kThemeActivePopupLabelTextColor EQU 37
- kThemeInactivePopupLabelTextColor EQU 38
-
- kAEThemeSwitch EQU 'thme' ; Event ID's: Theme Switched
-
- kThemeNoAdornment EQU 0
- kThemeDefaultAdornment EQU $01
- kThemeFocusAdornment EQU $04
- kThemeRightToLeftAdornment EQU $10
- kThemeDrawIndicatorOnly EQU $20
-
- kThemeBrushPassiveAreaFill EQU 25
- ENDIF ; __APPEARANCE__
-
-